{include file="admin/public/header" /}
<div class="aw-content-wrap">
    <form action="{:url('admin/ajax/saveconfig')}"  class="cmzForm" method="post" onsubmit="return false">
    <div class="mod">
        <?php if ($status == 'site') { ?>
        <div class="ibox-title ">
            <h3>
                <span class="pull-left"><?php e('站点信息'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
            <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('网站LOGO'); ?>:</span>
                            <div class="col-sm-2 col-xs-8">
                                 <p style="border:1px dotted #ddd;padding:2px;">
                                        <img src="{if condition='$system_logo'}{$system_logo}{else}/static/images/logo/thinkask_logo_black.png{/if}" alt="" class="weupload_img" style="width:120px;height:120px;" />
                                        <input type="hidden" name="system_logo" value="{if condition='$system_logo'}{$system_logo}{else}/static/images/logo/thinkask_logo_black.png{/if}">
                                    </p>
                                    <p class="weupload" style="text-align:center">上传LOGO</p>
                            </div>
                        </div>
                    </td>
                </tr>
                   <script type="text/javascript">
                        $(document).ready(function() {
                        // 初始化Web Uploader
                        var uploader = WebUploader.create({
                            // 选完文件后，是否自动上传。
                            auto: true,
                            // swf文件路径
                            swf: '/static/plus/js/plugins/ueditor/third-party/webuploader/Uploader.swf',
                            // 文件接收服务端。
                            server: "{:url('asset/upload/uploads',['dir'=>'avatar'])}",
                            // 选择文件的按钮。可选。
                            // 内部根据当前运行是创建，可能是input元素，也可能是flash.
                            pick: '.weupload',
                            // 只允许选择图片文件。
                            accept: {
                                title: 'Images',
                                extensions: '{:trim(getset('allowed_upload_types'),',')}',
                                // mimeTypes: 'image/*'
                            }

                        });
                        // 文件上传过程中创建进度条实时显示。
                        // uploader.on( 'uploadProgress', function(file,percentage) {
                        //     $('.weupload').html("上传:"+percentage+'%')
                        // });

                        // 文件上传失败，显示上传出错。
                        uploader.on( 'uploadError', function(file,json) {
                            cmzAlert(json.msg);
                        });

                       // 完成上传完了，成功或者失败，先删除进度条。
                        uploader.on( 'uploadSuccess', function(file,json) {
                            $( '.weupload_img' ).attr('src', json.file);
                            $("input[name='avatar_file']").val(json.file)
                        });
                        // 完成上传完了，成功或者失败，先删除进度条。
                        // uploader.on( 'uploadComplete', function( file ) {
                        //    $('.weupload').html("设置头像")
                        // });

                        });

                    </script>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('网站名称'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input type="text" class="form-control" name="site_name" value="<?php echo $config['site_name']; ?>">
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('网站简介'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" rows="4" name="description"  ><?php echo $config['description']; ?></textarea>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('网站关键词'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" rows="4" name="keywords"  ><?php echo $config['keywords']; ?></textarea>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('网站 ICP 备案号'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="icp_beian" class="form-control" type="text" value="<?php echo $config['icp_beian']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
               
            </table>
        </div>

        <?php } else if ($status == 'register') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('注册与访问'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('站点关闭'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="site_close" value="Y"<?php if ($config['site_close'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="site_close" value="N"<?php if ($config['site_close'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('站点关闭的提示'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input type="text" class="form-control" name="close_notice" value="<?php echo $config['close_notice']; ?>" />
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('新用户注册显示验证码'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="register_seccode" value="Y"<?php if ($config['register_seccode'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="register_seccode" value="N"<?php if ($config['register_seccode'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('新用户注册验证类型'); ?>:</span>
                            <div class="col-sm-8 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="register_valid_type" value="email"<?php if ($config['register_valid_type'] == 'email') { ?> checked="checked"<?php } ?> /> <?php e('邮件验证'); ?></label>
								</div>

                                <!-- <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="register_valid_type" value="approval"<?php if ($config['register_valid_type'] == 'approval') { ?> checked="checked"<?php } ?> /> <?php e('邮件验证 + 后台审核'); ?></label>
								</div> -->

                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="register_valid_type" value="N"<?php if ($config['register_valid_type'] == 'N') { ?> checked="checked"<?php } ?> /> <?php e('不验证'); ?></label>
								</div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('注册类型'); ?>:</span>
                            <div class="col-sm-8 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="register_type" value="open"<?php if ($config['register_type'] == 'open') { ?> checked="checked"<?php } ?> /> <?php e('开放注册'); ?></label>
								</div>

                              <!--   <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="register_type" value="invite"<?php if ($config['register_type'] == 'invite') { ?> checked="checked"<?php } ?> /> <?php e('邀请注册'); ?></label>
								</div> -->

                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="register_type" value="close"<?php if ($config['register_type'] == 'close') { ?> checked="checked"<?php } ?> /> <?php e('关闭注册'); ?></label>
								</div>
                            </div>
                        </div>
                    </td>
                </tr>
               <!--  <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('用户名规则'); ?>:</span>
                            <div class="col-sm-8 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" value="0" name="username_rule"<?php if ($config['username_rule'] == 0) { ?> checked="checked"<?php } ?> /> <?php e('不限制'); ?></label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" value="1" name="username_rule"<?php if ($config['username_rule'] == 1) { ?> checked="checked"<?php } ?> /> <?php e('汉字/字母/数字/下划线'); ?></label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" value="2" name="username_rule"<?php if ($config['username_rule'] == 2) { ?> checked="checked"<?php } ?> /> <?php e('字母/数字/下划线'); ?></label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" value="3" name="username_rule"<?php if ($config['username_rule'] == 3) { ?> checked="checked"<?php } ?> /> <?php e('汉字'); ?></label>
								</div>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('用户名最少字符数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="username_length_min" class="form-control" type="text" value="<?php echo $config['username_length_min']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('用户名最多字符数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="username_length_max" class="form-control" type="text" value="<?php echo $config['username_length_max']; ?>"/>

                                <span class="help-block"><?php e('注: 一个汉字等于 2 个字符'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('用户注册协议'); ?>:</span>
                            <div class="col-sm-7 col-xs-8">
                                <textarea class="form-control textarea" rows="8" name="register_agreement"  ><?php echo $config['register_agreement']; ?></textarea>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('用户注册名不允许出现以下关键字'); ?>:</span>
                            <div class="col-sm-7 col-xs-8">
                                <textarea class="form-control textarea" rows="5" name="censoruser"  ><?php echo $config['censoruser']; ?></textarea>

                                <span class="help-block"><?php e('每行填写一个关键字, 如: admin, 管理员等'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
                <!-- <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('用户注册后默认关注的用户 ID'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="def_focus_uids" class="form-control" type="text" value="<?php echo $config['def_focus_uids']; ?>"/>

                                <span class="help-block"><?php e('多个用户 ID 请用 , 隔开'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <!-- <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('首次登录推荐用户列表'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="welcome_recommend_users" class="form-control" type="text" value="<?php echo $config['welcome_recommend_users']; ?>"/>

                                <span class="help-block"><?php e('填写用户名, 若有多个用户名请用 , 隔开, 留空系统自动推荐'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr> -->
               <!--  <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('新用户注册获得邀请数量'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="newer_invitation_num" type="text" class="form-control" value="<?php echo $config['newer_invitation_num']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-3 col-xs-3 control-label"><?php e('新用户注册系统发送的欢迎内容'); ?>:</span>
                            <div class="col-sm-7 col-xs-8">
                                <textarea class="form-control textarea" rows="4" name="welcome_message_pm"  ><?php echo $config['welcome_message_pm']; ?></textarea>

                                <span class="help-block"><?php e('新用户注册欢迎内容, 以下变量可作为内容替换: {username}: 用户名{time}: 发送时间{sitename}: 网站名称'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
            <!--     <tr>
                    <td>
                        <div class="form-group mod-width">
                            <span class="col-sm-2 col-xs-3 control-label"><?php e('新用户默认邮件提醒设置'); ?>:</span>
                            <div class="col-sm-10 col-xs-8">
                                <input type="hidden" name="set_email_settings" value="1" />

                                <div class="checkbox i-checks checkbox-inline">
										<label>
                                    <input type="checkbox" name="new_user_email_setting[]" value="FOLLOW_ME"<?php if ($config['new_user_email_setting']['FOLLOW_ME'] != 'N') { ?> checked="checked"<?php } ?> /> <?php e('当有人关注我'); ?>
                                </label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label>
                                    <input type="checkbox" name="new_user_email_setting[]" value="QUESTION_INVITE"<?php if ($config['new_user_email_setting']['QUESTION_INVITE'] != 'N') { ?> checked="checked"<?php } ?> /> <?php e('有人邀请我回答问题'); ?>
                                </label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label>
                                    <input type="checkbox" name="new_user_email_setting[]" value="NEW_ANSWER"<?php if ($config['new_user_email_setting']['NEW_ANSWER'] != 'N') { ?> checked="checked"<?php } ?> /> <?php e('我关注的问题有了新回复'); ?>
                                </label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label>
                                    <input type="checkbox" name="new_user_email_setting[]" value="NEW_MESSAGE"<?php if ($config['new_user_email_setting']['NEW_MESSAGE'] != 'N') { ?> checked="checked"<?php } ?> /> <?php e('有人向我发送私信'); ?>
                                </label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label>
                                    <input type="checkbox" name="new_user_email_setting[]" value="QUESTION_MOD"<?php if ($config['new_user_email_setting']['QUESTION_MOD'] != 'N') { ?> checked="checked"<?php } ?> /> <?php e('我的问题被编辑'); ?>
                                </label>
								</div>
                            </div>
                        </div>
                    </td>
                </tr> -->
               <!--  <tr>
                    <td>
                        <div class="form-group mod-width">
                            <span class="col-sm-2 col-xs-3 control-label"><?php e('新用户默认通知设置'); ?>:</span>
                            <div class="col-sm-10 col-xs-8">
                                <input type="hidden" name="set_notification_settings" value="1" />

                               
                                <div class="checkbox i-checks checkbox-inline">
										<label><input name="new_user_notification_setting[<?php echo $key;?>]" type="checkbox" value="1" checked="checked"</label>
								</div>
                                
                            </div>
                        </div>
                    </td>
                </tr> -->
            </table>
        </div>

        <?php } else if ($status == 'functions') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('站点功能'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('网站公告'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" name="site_announce"  ><?php echo htmlspecialchars($config['site_announce']); ?></textarea>
                            </div>
                        </div>
                    </td>
                </tr>
         
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('通知未读数刷新间隔时间'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="unread_flush_interval" class="form-control" type="text" value="<?php echo $config['unread_flush_interval']; ?>"/>

                                <div class="help-block"><?php e('单位'); ?>: <?php e('秒'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('问题自动锁定时间'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="auto_question_lock_day" class="form-control" type="text" value="<?php echo $config['auto_question_lock_day']; ?>"/>

                                <div class="help-block"><?php e('单位'); ?>: <?php e('天'); ?>, <?php e('问题超过设定天数没有动作,系统则会自动锁定该问题, 设置为 0 则关闭自动锁定'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('网站统计代码'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" name="statistic_code" rows="9"><?php echo $config['statistic_code']; ?></textarea>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('问题举报理由选项'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" name="report_reason" rows="5" ><?php // echo get_setting('report_reason'); ?></textarea>

                                <div class="help-block"><?php e('每行填写一个举报理由'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
                <!-- <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('有新举报与认证申请私信提醒用户 ID'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="report_message_uid" class="form-control" type="text" value="<?php echo $config['report_message_uid']; ?>"/>

                                <div class="help-block"><?php e('留空则发送到 ID 为 1 的用户'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr> -->

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('管理员后台登录是否需要验证码'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="admin_login_seccode" value="Y"<?php if ($config['admin_login_seccode'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="admin_login_seccode" value="N"<?php if ($config['admin_login_seccode'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
              
            </table>
        </div>

        <?php } else if ($status == 'contents') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left">内容设置</span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">

               <!--  <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('编辑器设置'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label><input type="radio" name="advanced_editor_enable" value="Y"<?php if ($config['advanced_editor_enable'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('CKEditor 编辑器'); ?></label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="col-md-offset-1"><input type="radio" name="advanced_editor_enable" value="N"<?php if ($config['advanced_editor_enable'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('纯文本编辑器'); ?></label>
								</div>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label">启用分类功能:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="category_enable" value="Y" checked="checked" 是
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="category_enable" value="N" checked="checked">否
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
              <!--   <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('允许上传附件'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="upload_enable" value="Y"<?php if ($config['upload_enable'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="upload_enable" value="N"<?php if ($config['upload_enable'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('允许的附件文件类型'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="allowed_upload_types" class="form-control" type="text" value="<?php echo $config['allowed_upload_types']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
              <!--   <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('允许上传最大附件大小'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="upload_size_limit" class="form-control" type="text" value="<?php echo $config['upload_size_limit']; ?>"/>

                                <div class="help-block"><?php e('单位'); ?>: KB</div>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('回复内容最小字符数限制'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="answer_length_lower" class="form-control" type="text" value="<?php echo $config['answer_length_lower']; ?>"/>

                                <div class="help-block"><?php e('填写 0 则不限制'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
             
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('新问题强制要求添加话题'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="new_question_force_add_topic" value="Y"<?php if ($config['new_question_force_add_topic'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="new_question_force_add_topic" value="N"<?php if ($config['new_question_force_add_topic'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('问题话题数量限制'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="question_topics_limit" class="form-control" type="text" value="<?php echo $config['question_topics_limit']; ?>"/>

                                <div class="help-block"><?php e('填写 0 则不限制'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
               <!--  <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('自动展开评论'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="unfold_question_comments" value="Y"<?php if ($config['unfold_question_comments'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="unfold_question_comments" value="N"<?php if ($config['unfold_question_comments'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr> -->
        
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('话题标题最大字符数限制'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="topic_title_limit" type="text" class="form-control" value="<?php echo $config['topic_title_limit']; ?>"/>

                                <div class="help-block"><?php e('填写 0 则不限制'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
           
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('回复编辑/删除有效时间'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="answer_edit_time" type="text" class="form-control" value="<?php echo $config['answer_edit_time']; ?>"/>

                                <div class="help-block"><?php e('单位'); ?>: <?php e('分钟'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
              
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('系统自动选出最佳回复时间'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="best_answer_day" type="text" class="form-control" value="<?php echo $config['best_answer_day']; ?>"/>

                                <div class="help-block"><?php e('单位'); ?>: 天, <?php e('填写 0 则不启用'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('参与自动选出最佳回复的问题最小回复数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="best_answer_min_count" type="text" class="form-control" value="<?php echo $config['best_answer_min_count']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('参与自动选出最佳回复的最小赞同数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="best_agree_min_count" type="text" class="form-control" value="<?php echo $config['best_agree_min_count']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('阅读器获取最近多少天的热门问题'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="reader_questions_last_days" type="text" class="form-control" value="<?php echo $config['reader_questions_last_days']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('敏感词列表'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" rows="5" name="sensitive_words"><?php echo $config['sensitive_words']; ?></textarea>
                                <span class="help-block"><?php e('内容中如出现敏感词将进入审核，支持普通字符串和正则表达式，每行一个。正则表达式请以 <code>{</code> 开始、以 <code>}</code> 结束，且需符合 <a href="http://cn2.php.net/manual/zh/pcre.pattern.php" target="_blank">PCRE 模式</a>，如 <code>{/敏\s*感\s*词/i}</code>。'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>


              

               
            </table>
        </div>

        <?php } else if ($status == 'integral') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('积分与威望'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('使用积分系统'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="integral_system_enabled" value="Y"<?php if ($config['integral_system_enabled'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="integral_system_enabled" value="N"<?php if ($config['integral_system_enabled'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('积分单位'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_unit" type="text" class="form-control" value="<?php echo $config['integral_unit']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('新用户注册默认拥有积分'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_register" type="text" class="form-control" value="<?php echo $config['integral_system_config_register']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('用户完善资料获得积分（包括头像，一句话介绍，履历等资料）'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_profile" type="text" class="form-control" value="<?php echo $config['integral_system_config_profile']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('用户邀请他人注册且被邀请人成功注册'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_invite" type="text" class="form-control" value="<?php echo $config['integral_system_config_invite']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('发起问题'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_new_question" type="text" class="form-control" value="<?php echo $config['integral_system_config_new_question']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('回复问题'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_new_answer" type="text" class="form-control" value="<?php echo $config['integral_system_config_new_answer']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('问题被回复时增加发起者积分'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="integral_system_config_answer_change_source" value="Y"<?php if ($config['integral_system_config_answer_change_source'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="integral_system_config_answer_change_source" value="N"<?php if ($config['integral_system_config_answer_change_source'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('回复被评为最佳回复'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_best_answer" type="text" class="form-control" value="<?php echo $config['integral_system_config_best_answer']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('感谢回复'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_thanks" type="text" class="form-control" value="<?php echo $config['integral_system_config_thanks']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('回复被折叠'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_answer_fold" type="text" class="form-control" value="<?php echo $config['integral_system_config_answer_fold']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('发起者邀请用户回答问题且收到答案'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="integral_system_config_invite_answer" type="text" class="form-control" value="<?php echo $config['integral_system_config_invite_answer']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('发起者赞同反对威望系数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="publisher_reputation_factor" type="text" class="form-control" value="<?php// echoget_setting('publisher_reputation_factor'); ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('最佳回复威望系数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="best_answer_reput" type="text" class="form-control" value="<?php // echo get_setting('best_answer_reput'); ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('对数底值'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="reputation_log_factor" type="text" class="form-control" value="<?php// echo get_setting('reputation_log_factor'); ?>"/>

                                <div class="help-block"><?php e('控制显示的威望值大小，底数越小威望值越大，底数越大威望值越小，系统默认数值是 3'); ?><br /><?php e('威望公式：log((((用户组威望系数 x 赞同数 - 用户组威望系数 x 反对数) + 发起者赞同反对威望系数 + 最佳回复威望系数) + 0.5), 对数底值)'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>

        <?php } else if ($status == 'permissions') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('用户权限'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('用户对每个问题的回复限制'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label><input type="radio" name="answer_unique" value="Y"<?php if ($config['answer_unique'] == 'Y') { ?> checked="checked"<?php } ?> /><?php e('只允许回复一次'); ?></label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="col-md-offset-1"><input type="radio" name="answer_unique" value="N"<?php if ($config['answer_unique'] != 'Y') { ?> checked="checked"<?php } ?> /><?php e('不限制'); ?></label>
								</div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('允许用户回复自己发起的问题'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="answer_self_question" value="Y"<?php if ($config['answer_self_question'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="answer_self_question" value="N"<?php if ($config['answer_self_question'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('允许匿名发起或回复'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="anonymous_enable" value="Y"<?php if ($config['anonymous_enable'] == 'Y') { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="anonymous_enable" value="N"<?php if ($config['anonymous_enable'] != 'Y') { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>

        <?php } else if ($status == 'mail') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('邮件设置'); ?></span>
                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-warning mod-site-save testmail"><?php e('测试邮件'); ?></a></span>

            </h3>
        </div>
        <script type="text/javascript"> 
        $('.testmail').click(function(event) {
            $.ajax({
                url: "{:url('ajax/setting/testmail')}",
                type: 'post',
                dataType: 'json',
                data: {param1: 'value1'},
                success:function(d){

                }
            })
            
            
        });
        </script>
        <div class="tab-content mod-content">
            <table class="table table-striped">

          

                 <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e(' Host'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="mail_config[Host]" type="text" class="form-control" value="<?php echo $config['mail_config']['Host']; ?>" />
                                <div class="help-block">eg:smtp.126.com</div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e(' SMTP 端口'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="mail_config[port]" type="text" class="form-control" value="<?php echo $config['mail_config']['port']; ?>" />

                                <div class="help-block"><?php e('留空时默认服务器端口为 25，使用 SSL 协议默认端口为 465，详细参数请询问邮箱服务商'); ?></div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e(' SMTP 帐户'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="mail_config[username]" type="text" class="form-control" value="<?php echo $config['mail_config']['username']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e(' SMTP 密码'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="mail_config[password]" type="password" class="form-control" value="<?php echo $config['mail_config']['password']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
               
              
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('系统邮件来源邮箱地址'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="mail_config[from_email]" type="text" class="form-control" value="<?php echo $config['mail_config']['from_email']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                 <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('系统测试的邮件地址'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="mail_config[testmail]" type="text" class="form-control" value="<?php echo $config['mail_config']['testmail']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>

        <?php } else if ($status == 'openid') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('开放平台'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('开启 QQ 登录功能'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="qq_login_enabled" value="Y"<?php if ($config['qq_login_enabled'] == 'Y') { ?> checked="checked"<?php } ?>/> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="qq_login_enabled" value="N"<?php if ($config['qq_login_enabled'] != 'Y') { ?> checked="checked"<?php } ?>/> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('QQ 登录 AppID'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="qq_login_app_id" type="text" class="form-control" value="<?php echo $config['qq_login_app_id']; ?>"/>

                                <span class="help-block"><?php e('AppID 与 APPKey 需要到 <a href="http://connect.qq.com/" target="_blank">QQ 互联开放平台</a> 申请 (注意: 请申请网站不要申请应用)'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('QQ 登录 AppKey'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="qq_login_app_key" type="text" class="form-control" value="<?php echo $config['qq_login_app_key']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('开启微博登录功能'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="sina_weibo_enabled" value="Y"<?php if ($config['sina_weibo_enabled'] == 'Y') { ?> checked="checked"<?php } ?>/> <?php e('是'); ?>
                                    </label>
								</div>

                                    <div class="checkbox i-checks checkbox-inline">
										<label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="sina_weibo_enabled" value="N"<?php if ($config['sina_weibo_enabled'] != 'Y') { ?> checked="checked"<?php } ?>/> <?php e('否'); ?>
                                    </label>
								</div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label textwrap"><?php e('微博 App Key'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="sina_akey" type="text" class="form-control" value="<?php echo $config['sina_akey']; ?>"/>

                                <span class="help-block"><?php e('AppKey 需要到 <a href="http://open.weibo.com" target="_blank">微博开放平台</a> 申请 (注意: 请申请网站不要申请应用)'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label textwrap"><?php e('微博 App Secret'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="sina_skey" type="text" class="form-control" value="<?php echo $config['sina_skey']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('微信公众平台接口 Token'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="weixin_mp_token" type="text" class="form-control" value="<?php echo $config['weixin_mp_token']; ?>"/>

                                <span class="help-block">请与微信公众平台后台设置一致，URL 为 <code>%s</code></span>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('微信公众平台接口 EncodingAESKey'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input type="text" class="form-control" name="weixin_encoding_aes_key" value="<?php echo $config['weixin_encoding_aes_key']; ?>">
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('微信公众平台帐号角色'); ?>:</span>
                            <div class="col-sm-8 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="weixin_account_role" value="base"<?php if (!$config['weixin_account_role'] OR $config['weixin_account_role'] == 'base') { ?> checked="checked"<?php } ?> /> <?php e('普通订阅号'); ?></label>
								</div>
                            <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="weixin_account_role" value="subscription"<?php if ($config['weixin_account_role'] == 'subscription') { ?> checked="checked"<?php } ?> /> <?php e('微信认证订阅号'); ?></label>
								</div>
                            <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="weixin_account_role" value="general"<?php if ($config['weixin_account_role'] == 'general') { ?> checked="checked"<?php } ?> /> <?php e('普通服务号'); ?></label>
								</div>
                            <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="weixin_account_role" value="service"<?php if ($config['weixin_account_role'] == 'service') { ?> checked="checked"<?php } ?> /> <?php e('微信认证服务号'); ?></label>
								</div>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('微信公众平台 AppID'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="weixin_app_id" type="text" class="form-control" value="<?php echo $config['weixin_app_id']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('微信公众平台 AppSecret'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="weixin_app_secret" type="text" class="form-control" value="<?php echo $config['weixin_app_secret']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

               
                
               
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label textwrap"><?php e('支付宝账号'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="alipay_seller_email" type="text" class="form-control" value="<?php echo $config['alipay_seller_email']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label textwrap"><?php e('支付宝合作身份者 ID'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="alipay_partner" type="text" class="form-control" value="<?php echo $config['alipay_partner']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label textwrap"><?php e('支付宝安全检验码'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="alipay_key" type="text" class="form-control" value="<?php echo $config['alipay_key']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('支付宝签名方式'); ?>:</span>
                            <div class="col-sm-8 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="alipay_sign_type" value="MD5"<?php if (!$config['alipay_sign_type'] OR $config['alipay_sign_type'] == 'MD5') { ?> checked="checked"<?php } ?> /> MD5</label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="alipay_sign_type" value="RSA"<?php if ($config['alipay_sign_type'] == 'RSA') { ?> checked="checked"<?php } ?> /> RSA</label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="alipay_sign_type" value="0001"<?php if ($config['alipay_sign_type'] == '0001') { ?> checked="checked"<?php } ?> /> 0001</label>
								</div>

                                <span class="help-block"><?php e('如不确定请勿更改'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('支付宝字符编码格式'); ?>:</span>
                            <div class="col-sm-8 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="alipay_input_charset" value="utf-8"<?php if (!$config['alipay_input_charset'] OR $config['alipay_input_charset'] == 'utf-8') { ?> checked="checked"<?php } ?> /> UTF-8</label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="alipay_input_charset" value="gbk"<?php if ($config['alipay_input_charset'] == 'gbk') { ?> checked="checked"<?php } ?> /> GBK</label>
								</div>

                                <span class="help-block"><?php e('不建议更改'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('支付宝访问模式'); ?>:</span>
                            <div class="col-sm-8 col-xs-8">
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="alipay_transport" value="https"<?php if (!$config['alipay_transport'] OR $config['alipay_transport'] == 'https') { ?> checked="checked"<?php } ?> /> HTTPS</label>
								</div>
                                <div class="checkbox i-checks checkbox-inline">
										<label class="checkbox-inline"><input type="radio" name="alipay_transport" value="http"<?php if ($config['alipay_transport'] == 'http') { ?> checked="checked"<?php } ?> /> HTTP</label>
								</div>

                                <span class="help-block"><?php e('如服务器不支持 SSL 请改为 HTTP'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('支付宝商户私钥'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" rows="6" name="alipay_private_key"><?php echo $config['alipay_private_key']; ?></textarea>

                                <span class="help-block"><?php e('支付宝签名方式为 RSA 或 0001 时必须设置'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('支付宝公钥'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control textarea" rows="6" name="alipay_ali_public_key"><?php echo $config['alipay_ali_public_key']; ?></textarea>

                                <span class="help-block"><?php e('支付宝签名方式为 RSA 或 0001 时必须设置'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
              
            </table>
        </div>
        <?php } else if ($status == 'cache') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('性能优化'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('高级别缓存时间'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="cache_level_high" type="text" class="form-control" value="<?php echo $config['cache_level_high']; ?>"/>

                                <span class="help-block"><?php e('单位:秒'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('普通级别缓存时间'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="cache_level_normal" type="text" class="form-control" value="<?php echo $config['cache_level_normal']; ?>"/>

                                <span class="help-block"><?php e('单位:秒'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('低级别缓存时间'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="cache_level_low" type="text" class="form-control" value="<?php echo $config['cache_level_low']; ?>"/>

                                <span class="help-block"><?php e('单位:秒'); ?></span>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>

        <?php } else if ($status == 'interface') { ?>
        <div class="ibox-title">
            <h3>
                <span class="pull-left"><?php e('界面设置'); ?></span>

                <span class="pull-right"><a href="javascript:;"  class="btn btn-xs btn-primary mod-site-save"><?php e('快速保存'); ?></a></span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <table class="table table-striped">
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('用户界面风格'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <select class="form-control" name="ui_style">
                                <?php foreach($template as  $v) { ?>
                                    <option value="{$v}"<?php if ($config['ui_style'] == $v) { ?> selected="selected"<?php } ?>>{$v}</option>
                                    <?php } ?>
                                </select>
                            </div>
                        </div>
                    </td>
                </tr>
              <!--   <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('最新动态显示条数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="index_per_page" class="form-control" type="text" value="<?php echo $config['index_per_page']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <!-- <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('通知显示条数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="notifications_per_page" class="form-control" type="text" value="<?php echo $config['notifications_per_page']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr> -->
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('列表页问题显示条数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="contents_per_question" class="form-control" type="text" value="<?php echo $config['contents_per_question']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>
                 <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('列表页文章显示条数'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input name="contents_per_article" class="form-control" type="text" value="<?php echo $config['contents_per_article']; ?>"/>
                            </div>
                        </div>
                    </td>
                </tr>

            </table>
        </div>
        <?php } ?>
<div class="hr-line-dashed"></div>
       <div class="form-group">
        <div class="col-sm-4 col-sm-offset-2">
         <a href="javascript:;" class="btn btn-sm btn-primary pull-left m-t-n-xs cmzPost" style="margin-left:20px;,margin-top:20px;"><strong>提交配置</strong></a>
        </div>
    </div>
    </div>
    </form>
</div>
{include file="admin/public/footer" /}